/**
 * 项目名称:
 *
 * @Author: 夏国倩
 * @Date: 2023/9/18 14:53
 * @Copyright
 */
package Package;
public class IntegerTest6 {
    public static void main(String[] args) {
        double sum = 0;
        System.out.println("生成的10个随机数为：");
        for (int i = 0; i < 10; i++) {
            double a = Math.random()*10;
            System.out.println("第"+(i+1)+"个随机数为："+a);
            if (a==0){
                break;
            }else {
                sum +=10/a;
            }
        }
        System.out.println("\n商的和为："+sum);
    }
}
